// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'


import store from './store'

import Cookies from 'js-cookie'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


import './permission' // permission control


// 引入echarts
import * as echarts from 'echarts'

Vue.config.productionTip = false

Vue.use(ElementUI);

//定义全局变量
Vue.prototype.$echarts = echarts


Vue.filter('capitalizeFull', function(value) {
        if (!value) return ''
        value = value.toString()
        return value.charAt(0).toUpperCase() + value.slice(1)
    }),


    /* eslint-disable no-new */
    new Vue({
        el: '#app',
        router,
        store,
        // 注册成组件
        components: { App },
        // 声明模版
        template: '<App/>'
    })